<template>
    <div id="app">
            <router-view />
    </div>
</template>

<script>
import connect from '@/mixins/socket'
import { mapGetters } from 'vuex'
export default {
    name: 'App',
    mixins: [connect],
    data(){
        return {
            socket:"",
            logined:false,
        }
    },
    computed:{
        ...mapGetters(['userinfo']),
    },
    watch:{
        "userinfo.id"(value){
            if(value){
                this.logined=true;
                this.connect();
            }
        }
    },
    mounted() {
        // console.log = function() {}
        if(this.userinfo.id){
            this.connect();
        }
        console.log(this.$store.state.user,111)
        // // this.open1()
        // setTimeout(()=>{this.aaa()},1000)
    },
    methods: {
        
    },
}
</script>
<style lang="scss">
.root {
    margin: 50px 25px 0px 25px;
}
.my-flex {
    display: flex;
}
.marginBottom{
    margin-bottom: 10px;
}
</style>
